import axios from "./axios";

class SuperAdmin {
    constructor(){}

    fetchTenantList(page:any, pageSize:any){
        return axios.post('/api/admin/fetchTenantInfo', {page, pageSize});
    }

    fetchTenant(id:any){
        id = parseInt(id);
        return axios.post('/api/admin/fetchTenantInfo', {id});
    }

    searchTenantInfo(ttc:string, admin:string){
        return axios.post('/api/admin/searchTenantInfo', {ttc, admin});
    }

    delTenant(id:any){
        return axios.post('/api/admin/delTenant', {id});
    }

    updateTenantInfo(data:any) {
        return axios.post('/api/admin/updateTenantInfo', data);
    }

    addBalance(ttc:any, money:any){
        return axios.post('/api/admin/addBalance', {ttc, money});
    }

    addGift(ttc:any, money:any){
        return axios.post('/api/admin/addGift', {ttc, money});
    }

    addRPAPoints(ttc:any, points:any){
        return axios.post('/api/admin/addRPAPoints', {ttc, points});
    }
}

export default new SuperAdmin();